package com.RedRiver.hospitalsystem.finance_service.infra.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author 龙世超
 * @since 2022-04-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_bill")
public class Bill implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 账单id
     */
    @TableId(value = "bill_id", type = IdType.AUTO)
    private Integer billId;

    /**
     * 账单编号
     */
    private String billNo;

    /**
     * 检查或处方或挂号id
     */
    private Integer checkId;

    /**
     * 患者id
     */
    private Integer patientId;

    /**
     * 金额
     */
    private BigDecimal billPrice;

    /**
     * 操作人id
     */
    private Integer workerId;

    /**
     * 账单状态  0未支付 1已支付 2已退款
     */
    private Integer billState;

    /**
     * 创建日期
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 缴费日期
     */
    private LocalDateTime billTime;

    /**
     * 缴费方式id
     */
    private Integer paymethodId;

    /**
     * 缴费账号
     */
    private String billPayaccount;
    /**
     * 逻辑删除
     */
    @TableField("isDeleted")
    @TableLogic
    private Integer isDeleted;
    /**
     * 缴费类别 1药品 2检查 3挂号
     */
    private Integer paymentId;
    /**
     * 退款时间
     */
    private LocalDateTime refundTime;
    /**
     * 账单是否已消费 0未 1已
     */
    private Integer medicineState;
}
